home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / utility / trashi23.zip / TRASHICO.DOC < prev   
Text File  |  1993-10-04  |  14KB  |  323 lines

  1.  
  2.                   TrashIcon V2.2  ⌐ 1993 Mark McPherson
  3.                  =======================================
  4.  
  5. Overview
  6. ========
  7.  
  8.    TrashIcon is a program which places an icon on the WorkBench, and will
  9. delete any files dragged to that icon by the user - ie it uses the WB2
  10. feature of AppIcons.  Because of this it will only work under WB2.04 and
  11. above.
  12.  
  13.    The standard trashcan in use on the Amiga has several difficulties.  It
  14. can only delete files on the disk containing the trashcan, and also doesn't
  15. delete files immediately.  TrashIcon overcomes these difficulties.
  16.  
  17.    TrashIcon is highly configurable and gives the user great flexibility
  18. over what is deleted.  It will, unlike some other similar programs, keep
  19. the WorkBench in step with what you are deleting.  You can also format disks
  20. either quickly or fully.
  21.  
  22.  
  23. Distribution
  24. ============
  25.  
  26.    All code is Copyright ⌐ 1993 Mark McPherson.  It may be copied and
  27. distributed so long as no commercial profit is made out of it.  it may not
  28. be modified, sold, or included in any commercial distribution without my
  29. written permission.  Public Domain vendors are not allowed to sell this
  30. program for more than the price of a regular disk, which should be no
  31. more than the equivalent of 5 Dollars.  The author takes no responsibility
  32. for any loss or damage resulting from the use of this program.
  33.  
  34.    This distribution should contain the following files:
  35.  
  36.       TrashIcon
  37.       TrashIcon.info
  38.       TrashIcon.doc
  39.       TrashIcon.doc.info
  40.  
  41. though they may of course be archived with a program such as LhA.
  42.  
  43.  
  44. Installation
  45. ============
  46.  
  47.    TrashIcon works best when started from the WBStartup drawer of your
  48. boot disk.  It can also be started simply by double clicking on the
  49. TrashIcon program icon.  It should not be started from the CLI.
  50.  
  51.    To automatically run, simply copy the program and its icon to the
  52. WBStartup drawer.  Otherwise just copy them to where you want the program
  53. to reside.  Make sure that the program and its icon stay together else
  54. TrashIcon will most likely fail to work.  You can copy the documentation
  55. to anywhere you like, or simply deleted if you never want to use it again.
  56.  
  57.  
  58. Usage
  59. =====
  60.  
  61.    TrashIcon has many different features available making it flexible
  62. and configurable to how you want to use it.
  63.  
  64.    The icon that is placed on the WorkBench is simple the program icon,
  65. and may be changed if you don't like the icon supplied.  All of the
  66. program options are set by the icon's ToolTypes, but can be changed and
  67. set completely from within the program.  The position of this icon can be
  68. set on the WorkBench if you want.
  69.  
  70.    The main use of TrashIcon is obviously to delete files.  This is done
  71. by dragging an icon (or selection of icons) of the objects to delete, to
  72. the icon on the WorkBench.  If you drag a disk icon to TrashIcon, then
  73. you will be given the option of formatting that disk.  You can choose, if
  74. the confirm option is set, to delete some or all of the files you have 
  75. dragged.  If you drag a drawer, you can choose to delete both the drawer 
  76. and all its contents or only delete it if it is empty. Some files may be
  77. protected from deletion and you can choose whether you want to delete
  78. these automatically, not delete them, or be asked whether you want to
  79. delete them.
  80.  
  81.    By double clicking on the TrashIcon icon, you will bring up an options
  82. window where you can change the current settings of the program.  You can
  83. also make these changes permanent or simply temporary, or even forget them.
  84. Repeatedly double clicking on the icon will close and reopen this window.
  85. Note that while this window is open you can still drag icons to be deleted
  86. to the TrashIcon on the WorkBench, or even drag them into the window itself.
  87. It is this feature which is one of the major differences between this version
  88. of TrashIcon and earlier versions, or other similar programs.
  89.  
  90.  
  91. Options
  92. =======
  93.  
  94.    TrashIcon has many different options, all of which may be changed from
  95. its options window.  Each option is detailed below.
  96.  
  97.    The window itself is controlled by clicking on the buttons marked:
  98.  
  99.        QUIT - this will cause TrashIcon to finish all deletion of files
  100.               and then close the window, remove the icon, and quit.
  101.  
  102.       ABOUT - this will bring up an "about" requestor with details about
  103.               the version of the program etc.
  104.  
  105.         USE - this will close the options window, retaining any changes
  106.               to the current options that you have set.
  107.  
  108.        SAVE - this will cause the current options to be saved, so that the
  109.               next time TrashIcon is run, those will be the default options.
  110.               It also saves the current position of the options window.  This
  111.               is all done by setting the ToolTypes of the program icon.  You 
  112.               should never have to set these manually, except to add those
  113.               such as DONOTWAIT which are used by the WorkBench and
  114.               not TrashIcon.  Clicking on this button will also close the
  115.               options window.
  116.  
  117.      CANCEL - this will close the options window and revert to the original
  118.               settings before the window was opened.
  119.  
  120.  
  121.      Icon X Position - this is the horizontal coordinate on the WorkBench
  122.                        of TrashIcon's icon.  If something else occupies 
  123.                        this position then the WorkBench will decide where
  124.                        to put the icon.
  125.  
  126.      Icon Y Position - same as above, but for the vertical coordinate.
  127.  
  128.            Icon text - this is the text that appears below the icon on
  129.                        the WorkBench.  It defaults to the program name,
  130.                        but can be changed to anything else, including
  131.                        a blank name.
  132.  
  133.          Open Window - if this is set, then when the program is started,
  134.                        the options window will open immediately.
  135.  
  136.    Ignore Protection - this is set to what should happen if you try to
  137.                        delete a file that is protected from deletion.
  138.                        if set to ASK, then you will be given the option
  139.                        of deleting the file.  If set to YES, then such
  140.                        files will always be deleted.  If set to NO, then
  141.                        such files will never be deleted.
  142.  
  143.     Recursive Delete - if this is set, then when you drag a drawer to
  144.                        TrashIcon, both it and its contents will be 
  145.                        deleted.  If not, then the drawer will only
  146.                        be deleted if it is empty.
  147.  
  148.     Confirm Deletion - if this is set, then before any deletion takes
  149.                        place, you will be given the choice of either 
  150.                        continuing (OK) in which case the deletion will 
  151.                        take place as normal, stopping (CANCEL) and not
  152.                        deleting anything, or CONFIRM EACH where you
  153.                        will be asked before deleting every file.  If
  154.                        CONFIRM EACH is selected, then for every file you
  155.                        will be asked if you want to delete that file and
  156.                        continuing (YES), deleting that file and every one
  157.                        after it without any more prompting (ALL), not
  158.                        deleting that file and continuing (NO), or stopping
  159.                        at that point (NONE).
  160.  
  161.  
  162. Technical Notes
  163. ===============
  164.  
  165.    To delete a particular file, TrashIcon goes through the following steps:
  166.  
  167.  - it will first check if the file has an icon.
  168.  - if so then it will delete the file and its icon.
  169.  - if it is a drawer, and WorkBench has its window open, then TrashIcon will
  170.    first delete the icon in order to get WorkBench to close the window. It
  171.    will then try to delete the drawer.  If it still can't delete the drawer,
  172.    then it will put the icon back.
  173.  - if the file has no icon or if it is an icon with no associated file then
  174.    it will delete this.
  175.  - if the object is a drawer icon but there is no associated drawer, then 
  176.    TrashIcon will open its options window.  This isn't a bug in TrashIcon, 
  177.    but an unfortunate side-effect of the way WorkBench tells TrashIcon what
  178.    to delete.  Note that many other programs have similar behaviour.
  179.  - if an object cannot be deleted, then neither will its icon.
  180.  
  181. REMEMBER:  that non-empty directories cannot be deleted.  eg, if a file
  182.            in a directory is locked for some reason and cannot be deleted,
  183.            then  the directory will not be able to be removed - not even
  184.            with the Recursive Delete option set.
  185.  
  186.  
  187. The History of TrashIcon
  188. ========================
  189.  
  190.    TrashIcon has had many different versions - some of which have been
  191. released, some of which haven't.  Public release means that I have 
  192. distributed that version properly.  Semi-Public release means that I
  193. have freely given copies of the program to people, but haven't actually
  194. released it properly.  Internal release means that only I and a couple
  195. of close friends have used that version.
  196.  
  197.   V0.1 - 15/01/93 Internal release
  198.       The first version of the program.  Had an appicon and could
  199.     recusively delete files, but had no options window.  It also
  200.     didn't update the WorkBench in all cases.
  201.  
  202.   V0.5 - 20/01/93 Internal release
  203.       Added an options window.  Could now override the protection on
  204.     files. 
  205.  
  206.   V0.6 - 20/02/93 Public release
  207.       Made the position of the icon user-definable.  Also added initial
  208.     confirmation of deletion of files.  Wrote some documentation!!!
  209.  
  210.   V1.0 - 22/02/93 Internal release
  211.       Added purge option for wiping a file completely.
  212.  
  213.   V1.1 - 24/02/93 Internal release
  214.       Fixed a minor bug in the options window, and made the purge option
  215.     even more secure.
  216.  
  217.   V1.2 - 26/02/93 Public release
  218.       Totally removed purge option due to finding MAJOR unreliability in
  219.     the method used.  Decided that I wouldn't implement this until there
  220.     was a fool-proof method available.  Added extra confirmation handling,
  221.     and the ability to format disks.
  222.  
  223.   V1.3 - 28/02/93 Semi-Public release
  224.       Changed the deletion code significantly and fixed a couple of minor
  225.     bugs in the process.
  226.  
  227.   V1.4 - 13/05/93 Public release
  228.       Note the time lapse - I had exams!!!   Removed all Enforcer hits.
  229.     Unfortunately, this version has a VERY large bug which I didn't spot
  230.     until too late.  This version been put on a Fred Fish disk - I hope
  231.     nobody uses it! 
  232.       10/9/93 - Amiga Shopper reviewed this version and gave it 9/10.  Do
  233.                 they really test the programs they review???
  234.  
  235.   V1.5 - 27/05/93 Public release
  236.       Fixed the bug in V1.4.  Added the Icon Text option.
  237.  
  238.   V1.6 - 23/06/93 Public release
  239.       Completely rewrote the file deletion routines.  This version keeps
  240.     WorkBench in step with deleted files MOST of the time...
  241.  
  242.   V2.0 - 01/07/93 Semi-Public release
  243.       Code was rewritten from scratch.  The options window was made into
  244.     an AppWindow so that files could be dragged to it as well as the icon.
  245.     Also made ALL the options changeable here.  Up until now, options could
  246.     only be set by changing the program icon's ToolTypes.  Made the program
  247.     multitask while formatting a disk.  The delete routine now ALWAYS keeps
  248.     WorkBench in step with it.  All these new options and TrashIcon has
  249.     actually got SMALLER!
  250.  
  251.   V2.1 - 12/09/93 Semi-Public release
  252.       Changed the way in which deletion of .info files without a program
  253.     file was handled.  This makes the program run faster and also makes 
  254.     the code tidier, but does make the program a few bytes larger ;o)
  255.  
  256.   V2.2 - 29/09/93 Public release
  257.       Made changing the icon's positioning and text occur when USE or SAVE
  258.     is clicked on.  These only worked when first running TrashIcon in earlier
  259.     releases.  Also changed the SAVE routine - making it smaller, more
  260.     efficient, and more importantly removing a (possible) bug.  The program
  261.     is now even smaller than V2.0!
  262.  
  263.  
  264. Thanks and Testing
  265. ==================
  266.  
  267.    This version of TrashIcon has been tested under V37.175, V39.106 and
  268. V40.003 of the Operating System, on both accelerated and unaccelerated
  269. machines.  I have yet to test it on an '040 machine since I don't know
  270. anybody with one!  It should work on one OK though.  It definitely works
  271. on A500's, A600's, A2000's, A1200's, A3000's and A4000/030's.
  272.  
  273.    I have had a lot of people saying that TrashIcon doesn't seem to work
  274. properly when deleting from the RAM disk.  I don't know why this happens,
  275. especially since I do most of my testing in RAM: (for obvious reasons!)
  276. If it DOES happen then send me a report specifying your setup and the 
  277. circumstances in which it happened (a snoopdos or similar program's report
  278. would be handy!)
  279.  
  280.    In all testing I must say thank you to Matt Jennings for allowing me to
  281. use his Amiga 3000.  Without this, finding and removing Enforcer hits would
  282. have been nearly impossible!  Thanks also to everybody who wrote to me 
  283. and told me what bugs there were.  I'm pretty sure that this version is 
  284. finally bug free, but who knows ;-)
  285.  
  286.  
  287. About the Author
  288. ================
  289.  
  290.    Hi!  TrashIcon was written by me, Mark McPherson, in my spare time 
  291. while studying for a BSc in Compter Science at the University of Kent
  292. at Canterbury, in England.  I have never asked for money for this program,
  293. but have on one occasion been sent some!  I like to hear from all people
  294. who use this program, and any suggestions on how to improve it are
  295. welcomed.  When I started on this project, I simply wanted a small but 
  296. fast program that deleted my files!  All the other similar programs 
  297. around simply didn't do what I wanted, or were ridiculously large for
  298. what they did.  TrashIcon finally does everything that I want it to
  299. do, but I will continue to support it and update it if there is a need.
  300.  
  301. I can be contacted on the Internet by E-Mail at "msm@ukc.ac.uk", so please
  302. send me some E-Mail if you can.  For those of you without such access,
  303. you can write to me at:
  304.  
  305.           Mark McPherson
  306.           54 Wrestwood Road,
  307.           Bexhill-On-Sea,
  308.           East Sussex,
  309.           TN40 2LL
  310.  
  311.           England
  312.  
  313.  
  314. Note that if you want the latest version of this program then either 
  315. contact me via E-Mail and I'll send you the latest version, or send me a
  316. blank disk and the cost of return postage, and I'll post it to you.
  317.  
  318.  
  319. Anyway, I hope you like this program.
  320.  
  321.    Mark McPherson - 29th September 1993
  322.  
  323.